<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page import="java.util.ArrayList, edu.wfmanage.models.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Claim Approval</title>
<script language="JavaScript" type="text/javascript">
function doValidation() {
	var res=document.getElementById("result").value;
	//alert(res);
	var comment=document.getElementById("comments").value;
	//alert(comment);
	if (comment=="")
	{
	alert("Please provide Comments");
	return false;
 	}
	if(res==""){
		alert("Please give Result");
		return false;
		
	}
	return true;
}
</script>
</head>
<body>
<h1 align="center">Claim Approval</h1>
<s:form action="financeapproval">
<%-- <s:param name="RequestId" value="RequestId"/> --%>
<table id="text" align="center" border=0>
<tr><s:textfield name="RequestId" label = "Request Id" value="%{RequestId}"  size="20" readonly="true" /></tr>
<tr><s:textfield name="limit" label = "LTA Limit of this employee" value="%{LTALimit}"  size="20" readonly="true" /></tr>
<tr><s:textfield label = "Mode of Travel" name="mode" value="%{claim.mode}"  size="20" readonly="true" /></tr>
<tr><s:textfield name="Source" label = "Source" value="%{claim.Source}"  size="20" readonly="true" /></tr>
<tr><s:textfield name="Destination" label = "Destination" value="%{claim.Destination}"  size="20" readonly="true" /></tr>
<tr><s:textfield name="Distance" label = "DistanceTravelled(in kms)" value="%{claim.Distance}"  size="20" readonly="true" /></tr>
<tr><s:textfield name="Fare" label = "TravelFare" value="%{claim.Fare}"  size="20" readonly="true" /></tr>
<tr><s:textfield name="amountApproved" label = "Amount to be Approved" value="%{claim.ApprovedAmount}"  size="20" readonly="true"  /></tr>
<tr><s:textfield name="financeComments" label = "Finance Approval comments" value="" id="comments"  width="50" height="5" /></tr>
<s:select label="Finance Approval Result" headerKey="" headerValue="Do Finance Approval" name="financeResult" list="#{'Approved':'Approve Claim', 'Rejected':'Reject Claim'}" value="" id="result" />
<tr></tr>
</table>
<s:submit name = "Submit"  value="Finish" onClick="return doValidation()" align="center" />
<%-- <s:submit name = "Submit"  value="Back"  align="center" /> --%>
</s:form>
</body>
</html>